package com.sqrj.phoneorder.service;

import com.sqrj.phoneorder.dao.WxOrderUserMapper;
import com.sqrj.phoneorder.model.WxOrderUser;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class WxOrderUserService {

    @Resource
    private WxOrderUserMapper wxOrderUserMapper;

//    增加保存用户信息
    public void save(WxOrderUser wxorderUser){
        wxOrderUserMapper.insertSelective(wxorderUser);
        System.out.println( "----------------增加用户----------------");
    }
//  用户登录
    public WxOrderUser login(String openId){
        WxOrderUser wxOrderUser =   wxOrderUserMapper.selectByWxid(openId);
        return wxOrderUser;
    }
}
